package Command;

/**
 * Another Receiver
 *
 */
public class Calculator {
	public enum Operator{
		ADD, SUB, MUL, DIV
	}
	
	private int value ; 
	
	public Calculator(){
		value = 0;
	}
	
	public void Operation(Operator op, int val){
		switch(op){
		
		case ADD:
			value += val;
			break;
		case SUB:
			value -= val;
			break;
		case MUL:
			value *= val;
			break;
		case DIV:
			value /= val;
			break;
		default:
			break;
		
		}
		
		System.out.println("Value is:" + value);
	}
	
	
	
	
	
}
